<?php if (!defined('HKCMS_VERSION')) exit(); ?>
  <div class="table_list">
    <table width="100%">
      <colgroup>
      <col width="90">
      <col>
      <col width="160">
      </colgroup>
      <thead>
        <tr>
          <td align="center">应用图标</td>
          <td>应用介绍</td>
          <td align="center">操作</td>
        </tr>
      </thead>
      {volist name="data" id="vo"}
      <tr>
        <td>
            <div class="app_icon">
            {if condition=" !empty($vo['image']) "}
            <img src="{$vo.image}" alt="{$vo.title}" width="80" height="80">
            {else/}
            <img src="{$config_siteurl}statics/images/modul.png" alt="{$vo.modulename}" width="80" height="80">
            {/if}
            </div>
        </td>
        <td valign="top">
            <h3 class="mb5 f12">
                <a target="_blank" href="{$vo.fullurl}">{$vo.title}</a>
            </h3>
            <div class="mb5">
                <span class="mr15">版本：<b>{$vo.version}</b></span>
                <span>开发者：{$vo.username}</span>
                <span>适配 hkcms 版本：
                    {if condition="$vo['hkcms_version']"}
                    {$vo.hkcms_version_op}{$vo.hkcms_version}
                    {else /}
                    <font color="#FF0000">没有标注，可能存在兼容风险</font>
                    {/if}
                </span>
            </div>
            <div class="gray">
                {if condition=" $vo['description'] "}
                    {$vo.description}{else /}没有任何介绍
                {/if}
            </div>
        </td>
        <td align="center">
          <?php
		  if(!isModuleInstall($vo['mark'])){
              if (!version_compare(HKCMS_VERSION,$vo['hkcms_version'],$vo['hkcms_version_op'])) {
                  echo '版本要求('.$vo['hkcms_version_op'].$vo['hkcms_version'].')';
              } else if($vo['price']>0){
                  if (!empty($vo['ispaid']) && $vo['ispaid']==1) {
                      echo '<a href="'.url('install',array('id'=>$vo['id'],'mark'=>$vo['mark'],'version'=>$vo['version'])).'" class="btn btn_submit mr5 Js_install">安装</a>';
                  } else {
                      echo "<a href='".$vo['fullurl']."' target='_blank' class=\"btn btn_submit\">购买</a><br /><font color=\"#FF0000\">价格：".$vo['price']." 元</font>";
                  }
              } else if ($vo['price']<=0) {
                  echo '<a href="'.url('install',array('id'=>$vo['id'],'mark'=>$vo['mark'],'version'=>$vo['version'])).'" class="btn btn_submit mr5 Js_install">安装</a>';
              }
		  }else{
			 //有安装，检测升级
			 if($vo['upgrade']){
				 echo '<a href="'.url('upgrade',array('id'=>$vo['id'],'mark'=>$vo['mark'])).'" class="btn btn_submit mr5 Js_upgrade" id="upgrade_tips_'.$vo['mark'].'">安装新版本'.$vo['newVersion'].'</a>';
			 } else {
                 echo '已安装';
             }
		  }
		  ?>
        </td>
      </tr>
      {/volist}
    </table>
  </div>
  <div class="p10">
        <div class="pages">{$Page}</div>
   </div>